<?php
namespace app\admin\model;


class Activity extends \think\Model {

    protected $autoWriteTimestamp = true;
    protected $updateTime = false;

    public function getApplyStartTimeStrAttr($val, $data){
        return date('Y-m-d', $data['apply_start_time']);
    }
    public function getApplyEndTimeStrAttr($val, $data){
        return date('Y-m-d', $data['apply_end_time']);
    }
    public function getStartTimeStrAttr($val, $data){
        return date('Y-m-d', $data['start_time']);
    }
    public function getEndTimeStrAttr($val, $data){
        return date('Y-m-d', $data['end_time']);
    }
    public function getImagesArrAttr($val, $data){
        return explode(',', $data['images']);
    }

    public function setApplyStartTimeAttr($val, $data){
        return strtotime($val);
    }
    public function setApplyEndTimeAttr($val, $data){
        return strtotime($val);
    }
    public function setStartTimeAttr($val, $data){
        return strtotime($val);
    }
    public function setEndTimeAttr($val, $data){
        return strtotime($val);
    }
    public function setImagesAttr($val){
        return implode(',', $val);
    }



}